package com.yyj.service;
import com.yyj.entity.*;
import lombok.extern.slf4j.Slf4j;
import com.yyj.dao.UserDao;
import com.yyj.exception.CustomException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Slf4j
@Service
public class CatService {
    @Autowired
    UserDao userDao;
    public List<Pet> getCat(PetParams petParams) {
        List<Pet> list = userDao.getCat(petParams);
        return list;
    }


    public void insertCat(Pet pet) {
        userDao.insertCat(pet);
    }

    public User findById(Integer id) {
        return userDao.findById(id);
    }

    public void update(Pet pet) {
        userDao.update(pet);
    }

    public void delete(Integer petId) {
        userDao.delete(petId);
    }


}
